package com.hippo.client.controller.nacos;

import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName NacosConfigController
 * @Description 获取nacos配置
 * @Author tangxl
 * @create 2023-03-23 11:43
 **/

@RestController
@RequestMapping("/nacos/config")
@RefreshScope
@Tag(name = "NacosConfigController", description = "获取nacos配置")
public class NacosConfigController {

    @Value("${server-name}")
    private String version;

    @GetMapping("/get")
    public String get() {
        return version;
    }
}
